Modular Rails by Denizet Thibault
Author:Denizet, Thibault
Language: eng
Format: epub
Publisher: Thibault Denizet
Published: 2015-04-20T16:00:00+00:00
Step 5: .rspec
I like to add the following to the .rspec file to get a better output when running the specs.
--color --require spec_helper --format documentation
Step 6: Run Tests
We can finally try to run the tests! From the Core engine folder, run rspec and you should get: Figure 4.14
Figure 4.14
Great, it’s working! Let’s add some factories and some simple tests now!
Step 7: Create User factory
Create the folders core/spec/factories/samurai/ and create a file named user.rb inside.
# core/spec/factories/samurai/user.rb require 'faker' module Samurai FactoryGirl.define do factory :user, class: 'Samurai/User' do |f| f.email { Faker::Internet.email } password 'password' password_confirmation 'password' admin false end factory :admin, parent: :user do |f| admin true end end end
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(21191)
Hello! Python by Anthony Briggs(20456)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(18849)
Dependency Injection in .NET by Mark Seemann(18581)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(18133)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(17839)
Kotlin in Action by Dmitry Jemerov(17829)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(16942)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(16671)
Grails in Action by Glen Smith Peter Ledbrook(15807)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(10542)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(8059)
Microservices with Go by Alexander Shuiskov(7824)
Practical Design Patterns for Java Developers by Miroslav Wengner(7725)
Test Automation Engineering Handbook by Manikandan Sambamurthy(7678)
Angular Projects - Third Edition by Aristeidis Bampakos(7169)
The Art of Crafting User Stories by The Art of Crafting User Stories(6614)
NetSuite for Consultants - Second Edition by Peter Ries(6536)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(6309)